import lazyLoadView from '@/router/lazy-load';
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';

const StructureManagement: AppRouteRecordRaw = {
  path: '/structure',
  name: 'Structure',
  component: DEFAULT_LAYOUT,
  meta: {
    locale: 'menu.structure',
    requiresAuth: false,
    icon: 'icon-storage',
    order: 102,
    // roleCode: 'GROUP_ELDER_ADMIN',
  },
  children: [
    {
      path: 'station',
      name: 'StructureStation',
      component: lazyLoadView(
        () => import('@/views/lhj-v1/structure-management/m-station/index.vue')
      ),
      meta: {
        locale: 'menu.structure.station',
        requiresAuth: false,
        // roleCode: 'GROUP_ELDERLY',
        pageName: '站点列表',
      },
    },
    {
      path: 'department',
      name: 'StructureDepartment',
      component: lazyLoadView(
        () =>
          import('@/views/lhj-v1/structure-management/m-department/index.vue')
      ),
      meta: {
        locale: 'menu.structure.department',
        requiresAuth: false,
        // roleCode: 'GROUP_ELDERLY',
        pageName: '部门列表',
      },
    },
    {
      path: 'position',
      name: 'StructurePosition',
      component: lazyLoadView(
        () => import('@/views/lhj-v1/structure-management/m-position/index.vue')
      ),
      meta: {
        locale: 'menu.structure.position',
        requiresAuth: false,
        // roleCode: 'GROUP_ELDERLY',
        pageName: '岗位列表',
      },
    },
    {
      path: 'employee',
      name: 'StructureEmployee',
      component: lazyLoadView(
        () => import('@/views/lhj-v1/structure-management/m-employee/index.vue')
      ),
      meta: {
        locale: 'menu.structure.employee',
        requiresAuth: false,
        // roleCode: 'GROUP_ELDERLY',
        pageName: '员工列表',
      },
    },
  ],
};

export default StructureManagement;
